package com.sunday.fangdaifu.activity.task;

import android.os.Bundle;
import android.widget.TextView;

import com.sunday.common.base.BaseActivity;
import com.sunday.fangdaifu.R;
import com.sunday.fangdaifu.model.TaskDetail;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by 刘涛 on 2017/7/18.
 */

public class HouseDetailActivity extends BaseActivity {


    @Bind(R.id.title_view)
    TextView titleView;
    @Bind(R.id.house_name)
    TextView houseName;
    @Bind(R.id.leader_name)
    TextView leaderName;
    @Bind(R.id.leader_mobile)
    TextView leaderMobile;
    @Bind(R.id.house_type)
    TextView houseType;
    @Bind(R.id.house_floor)
    TextView houseFloor;

    private TaskDetail taskDetail;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_house_detail);
        ButterKnife.bind(this);
        titleView.setText("建筑相关信息");
        taskDetail= (TaskDetail) getIntent().getSerializableExtra("taskDetail");
        initView();
    }
    private void initView(){
        if (taskDetail==null){return;}
        houseName.setText(taskDetail.getHouseName());
        leaderName.setText(taskDetail.getNickName());
        leaderMobile.setText(taskDetail.getMobile());
        houseType.setText(taskDetail.getFrameworkType());
        houseFloor.setText(String.valueOf(taskDetail.getFloor()));
    }
}
